﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace _04_GetHashCode
{
    class Program
    {
        static void Main(string[] args)
        {
            //看不懂这个GetHashCode()有什么用
            int a = 123;
            int b = 123;
            string str01 = "123";
            string str02 = "123";
            Console.WriteLine(GetEquals(a, b));
            Console.WriteLine(GetEquals(str01, str02));
            Console.ReadKey();
        }
        static bool GetEquals(object a, object b)
        {
            return a.GetHashCode() == b.GetHashCode() ? true : false;
        }
    }
}
